import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/es/locale/lang/zh-cn'
import axios from 'axios'

const app = createApp(App)
app.config.globalProperties.$https = axios
app.use(router).use(ElementPlus, {locale}).mount('#app')

axios.get("./../config.json", {headers: {"Cache-Control": "no-cache" }}).then((result)=>{
  //存到localStorage里面，方便在其他页面获取
  localStorage.setItem('ApiUrl',result.data.ApiUrl);
  //也可以声明成全局变量,在其他页面用this.ApiUrl获取
//  Vue.prototype.ApiUrl=result.data.ApiUrl
}).catch((error)=>{console.log(error)});